package com.meiqiang.attach;

import com.sun.tools.attach.VirtualMachine;

/**
 * @author : zhengmeiqiang
 * @date : 2024/11/8 14:40
 */
public class AttachRetransformTest {

    public static void main(String[] args) {
        try {
            VirtualMachine vm = VirtualMachine.attach("31788");
            vm.loadAgent("D:\\idea_pj\\java-agent\\agentmainAgent\\target\\agentmainAgent-1.0-SNAPSHOT.jar","params");
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}
